Skip to content

fix: remove default value prefill from prompt inputs#416

Open
minorun365 wants to merge 1 commit into
aws:mainfrom
minorun365:fix/remove-default-prefill-in-prompt
Open

fix: remove default value prefill from prompt inputs#416
minorun365 wants to merge 1 commit into
aws:mainfrom
minorun365:fix/remove-default-prefill-in-prompt

Conversation

@minorun365

@minorun365 minorun365 commented Jan 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix prompt input showing prefilled default value (e.g., Choice [1]: 1 instead of Choice [1]: )
  • The default parameter in prompt_toolkit.prompt() both sets the fallback value AND prefills the input field, which is confusing UX

Changes

Changed 2 occurrences in _configure_impl.py:

  • Deployment type selection (line 447)
  • Runtime version selection (line 328)

Before:

choice = prompt("Choice [1]: ", default="1").strip()

After:

choice = prompt("Choice [1]: ").strip() or "1"

This keeps the default behavior (pressing Enter uses the default value) while showing a clean empty input field.

Test plan

  • Run agentcore configure and verify deployment type selection shows Choice [1]: with empty input
  • Verify pressing Enter still selects option 1
  • Verify entering 2 correctly selects option 2
  • Verify runtime selection behaves the same way

prompt_toolkit's `default` parameter not only sets the fallback value
when Enter is pressed, but also prefills the input field. This caused
the input to show "Choice [1]: 1" instead of "Choice [1]: " which made
it confusing to enter different values.

Changed to use empty prompt with `or` fallback for cleaner UX.
@minorun365

Copy link
Copy Markdown
Contributor Author

Hi @aidandaly24 @jariy17, friendly ping! 👋

I know you're busy, but I'd appreciate it if you could take a look at this when you have a moment.

This bug fix PR has been open for over a month now. It's a simple UX improvement that removes the confusing prefilled default values in prompt inputs.

I noticed the CI (check-access-and-checkout) has failed - likely due to the long wait time. Could you please re-run the CI when you get a chance?

The change is minimal (just 2 lines) and has been manually tested. Would appreciate your review!

Thanks so much! 🙏

@jariy17 jariy17 closed this Feb 2, 2026
@jariy17 jariy17 reopened this Feb 2, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@165496e). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #416   +/-   ##
=======================================
  Coverage        ?   86.12%           
=======================================
  Files           ?      122           
  Lines           ?    11716           
  Branches        ?     1806           
=======================================
  Hits            ?    10090           
  Misses          ?     1197           
  Partials        ?      429           
Flag Coverage Δ
unittests 86.12% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jariy17

jariy17 commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Hey @minorun365, we are rerunning your workflow. Once it's passes, I'll review the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants